From 7e448d8261a6eea1a639ac03714b2e4ae8c02230 Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Sun, 21 Aug 2011 18:23:59 +0000 Subject: [PATCH] Remove the * {{msg}} syntax introduced to MediaWiki:Sidebar in r66974. This syntax is in the way of projects attempting to use a more flexible sidebar-like message parser, or fixing the dependence on MediaWiki:Sidebar for sidebar config. Eliminating it before people end up using it in production (from my tests it never actually worked in 1.17). --- includes/Skin.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 52e6ff1bd7..fada374d50 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1111,7 +1111,6 @@ abstract class Skin extends ContextSource { */ function addToSidebarPlain( &$bar, $text ) { $lines = explode( "\n", $text ); - $wikiBar = array(); # We need to handle the wikitext on a different variable, to avoid trying to do an array operation on text, which would be a fatal error. $heading = ''; @@ -1181,25 +1180,12 @@ abstract class Skin extends ContextSource { 'id' => 'n-' . Sanitizer::escapeId( strtr( $line[1], ' ', '-' ), 'noninitial' ), 'active' => false ), $extraAttribs ); - } elseif ( ( substr( $line, 0, 2 ) == '{{' ) && ( substr( $line, -2 ) == '}}' ) ) { - global $wgParser; - - $line = substr( $line, 2, strlen( $line ) - 4 ); - - $options = new ParserOptions(); - $options->setEditSection( false ); - $options->setInterfaceMessage( true ); - $wikiBar[$heading] = $wgParser->parse( wfMsgForContentNoTrans( $line ) , $this->getTitle(), $options )->getText(); } else { continue; } } } - if ( count( $wikiBar ) > 0 ) { - $bar = array_merge( $bar, $wikiBar ); - } - return $bar; } -- 2.20.1